package biolabs.visual.j3d

import javax.media.j3d.{Group, Node}

import biolabs.visual.VisualizationMethod

object Java3D extends VisualizationMethod[Node]("Java3D") {
	override def supportsOnScreen() = true
	override def createWindow() = Some(new Java3DWindowSink())
	override def combine(nodes: Iterable[Node]) = {
		if(nodes.tail.isEmpty)
			nodes.head
		else {
			val group = new Group()
			for(n <- nodes)
				group.addChild(n)
			group
		}
	}
}
